home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / gnat1792.zip / gnat179b / t-adainc / a-stwima.ads < prev    next >
Text File  |  1994-05-19  |  4KB  |  89 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT RUNTIME COMPONENTS                          --
  4. --                                                                          --
  5. --                A D A . S T R I N G S . W I D E _ M A P S                 --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                                                                          --
  9. --                            $Revision: 1.3 $                              --
  10. --                                                                          --
  11. --           Copyright (c) 1992,1993,1994 NYU, All Rights Reserved          --
  12. --                                                                          --
  13. -- GNAT is free software;  you can  redistribute it  and/or modify it under --
  14. -- terms of the  GNU General Public License as published  by the Free Soft- --
  15. -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
  16. -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
  17. -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
  18. -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
  19. -- for  more details.  You should have  received  a copy of the GNU General --
  20. -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
  21. -- to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. --
  22. --                                                                          --
  23. ------------------------------------------------------------------------------
  24.  
  25.  
  26. package Ada.Strings.Wide_Maps is
  27.  
  28.    --  Representation for a set of Wide_Character values:
  29.  
  30.    type Wide_Character_Set is array (Wide_Character range <>) of Boolean;
  31.    pragma Pack (Wide_Character_Set);
  32.  
  33.    Null_Set : constant Wide_Character_Set;
  34.    --  The null set has a null range
  35.  
  36.    function "="   (Left, Right : Wide_Character_Set) return Boolean;
  37.  
  38.    function "not" (Right : Wide_Character_Set)       return Wide_Character_Set;
  39.  
  40.    function "and" (Left, Right : Wide_Character_Set) return Wide_Character_Set;
  41.  
  42.    function "or"  (Left, Right : Wide_Character_Set) return Wide_Character_Set;
  43.  
  44.    function "xor" (Left, Right : Wide_Character_Set) return Wide_Character_Set;
  45.  
  46.    function Is_In (Element : in Wide_Character;
  47.                    Set     : in Wide_Character_Set)
  48.       return Boolean;
  49.  
  50.    function Is_Subset (Elements : in Wide_Character_Set;
  51.                        Set      : in Wide_Character_Set)
  52.       return Boolean;
  53.  
  54.    function "<=" (Left  : in Wide_Character_Set;
  55.                   Right : in Wide_Character_Set)
  56.       return Boolean renames Is_Subset;
  57.  
  58.    subtype Wide_Character_Sequence is Wide_String;
  59.    --  Alternative representation for a set of Wide_Character values:
  60.  
  61.    function To_Set (Sequence : in Wide_Character_Sequence)
  62.      return Wide_Character_Set;
  63.  
  64.    function To_Set (Singleton : in Wide_Character)
  65.      return Wide_Character_Set;
  66.  
  67.    function To_Sequence (Set : in Wide_Character_Set)
  68.      return Wide_Character_Sequence;
  69.  
  70.    --  Representation for a Wide_Character to Wide_Character mapping:
  71.  
  72.    type Wide_Character_Mapping is
  73.      array (Wide_Character range <>) of Wide_Character;
  74.  
  75.    Identity : constant Wide_Character_Mapping;
  76.    --  The identity mapping has a null range
  77.  
  78.    function To_Mapping (From, To : in Wide_Character_Sequence)
  79.      return Wide_Character_Mapping;
  80.  
  81.    type Wide_Character_Mapping_Function is
  82.       access function (From : in Wide_Character) return Wide_Character;
  83.  
  84. private
  85.    Null_Set : constant Wide_Character_Set     := ('1' .. '0' => False);
  86.    Identity : constant Wide_Character_Mapping := ('1' .. '0' => ' ');
  87.  
  88. end Ada.Strings.Wide_Maps;
  89.